Skip to content

Improve error estimation (API *and* implementation)#852

Merged
pnkraemer merged 8 commits into
mainfrom
improve-error-estimation
Feb 18, 2026
Merged

Improve error estimation (API *and* implementation)#852
pnkraemer merged 8 commits into
mainfrom
improve-error-estimation

Conversation

@pnkraemer
Copy link
Copy Markdown
Owner

@pnkraemer pnkraemer commented Feb 18, 2026

Semi-breaking, in the sense that a variable that has been introduced since the last release has now been renamed.

Changes:

  • Make test cases for solve-and-save-at not cover the product space of all configurations, but keep all but one parameter fixed while varying this parameter. Result: total tests reduce from >400 to <200, and test runtime goes from more than 550 seconds to approximately 200 seconds.
  • Rename all "errorest" variables into "error" variables so that all error-estimator constructors fit into a single line in applications. Also, the "estimate" in error estimation should be implied.
  • Merge the cached and non-cached versions of error estimators and distinguish them via a flag during construction. The rest of their code is too similar for two different objects to exist in the first place.
  • Rename errorest_local_residual(_cached) into error_residual_std because the "local" is implied for error estimation, and because the estimator specifically uses the marginal standard deviation.
  • Move the PDE benchmark to the basic examples because it doesn't have an external dependency
  • Make normalisation in error estimation acknowledge higher-order information. Here is the before and after for the van-der-Pol and Pleiades benchmarks (which are second-order problems):

VdP Before:
Screenshot from 2026-02-18 10-13-12

VdP After:
image

Now, the fourth-order solver beats LSODA, and all solvers cover the ranges of precision more evenly.

Pleiades Before:

Screenshot from 2026-02-18 10-43-24

Pleiades After:

Screenshot from 2026-02-18 10-42-59

Now, the precision ranges are more evenly covered (similar to the non-probabilistic methods).

@pnkraemer pnkraemer added enhancement New feature or request internals Improving the inner workings breaking This change breaks the existing API labels Feb 18, 2026
@pnkraemer pnkraemer merged commit efb91ea into main Feb 18, 2026
10 checks passed
@pnkraemer pnkraemer deleted the improve-error-estimation branch February 18, 2026 09:54
nathanaelbosch added a commit to nathanaelbosch/ProbNumDiffEq.jl that referenced this pull request Feb 18, 2026
The probabilistic error estimate is the standard deviation of the
predicted constraint residual. For second-order ODEs the constraint
operates on u'', so converting to a local error in u requires scaling
by dt²/2 (Taylor series), not just dt as for first-order ODEs.

This aligns with the approach in pnkraemer/probdiffeq#852 and
significantly improves step size selection for second-order problems
like Pleiades.
nathanaelbosch added a commit to nathanaelbosch/ProbNumDiffEq.jl that referenced this pull request Feb 23, 2026
The probabilistic error estimate is the standard deviation of the
predicted constraint residual. For second-order ODEs the constraint
operates on u'', so converting to a local error in u requires scaling
by dt²/2 (Taylor series), not just dt as for first-order ODEs.

This aligns with the approach in pnkraemer/probdiffeq#852 and
significantly improves step size selection for second-order problems
like Pleiades.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking This change breaks the existing API enhancement New feature or request internals Improving the inner workings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant